package itheima.com.Reader;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class BufferedWriter_ {

    public static void main(String[] args) {

        String filePath = "D:\\一条小团团\\xiao.txt";
        String len;
        BufferedWriter bufferedWriter = null;

        try {
            bufferedWriter = new BufferedWriter(new FileWriter(filePath,true));
            bufferedWriter.write("hello,写入。。。。。。。");
            bufferedWriter.newLine();
            bufferedWriter.write("龙潭虎穴。。。。。。。。。");
            bufferedWriter.newLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }finally {
            try {
                bufferedWriter.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }


    }

}
